import request from '@/utils/request.js'

export const loginApi = async (data) => {
  return request({
    url: '/api/login',
    method: 'post',
    data
  })
}

export const getUserInfo = async () => {
  return request({
    url: '/api/user/info',
    method: 'get'
  })
}

export const logout = async () => {
  return request({
    url: '/api/user/logout',
    method: 'get'
  })
}